home *** CD-ROM | disk | FTP | other *** search
- Path: wariat.org!!dhall
- From: dhall@ (d. hall)
- Newsgroups: comp.lang.c
- Subject: Re: ASCII value of a character
- Date: 6 Feb 1996 00:38:57 GMT
- Organization: APK - Internet Provider for Ohio.
- Message-ID: <4f67v1$piu@wariat.wariat.org>
- References: <Pine.SUN.3.91.960202222737.26868B-100000@parsifal.nando.net>
- <Pine.A32.3.91.960204214621.123007E-100000@red.weeg.uiowa.edu>
- NNTP-Posting-Host: mentor-dial-1.apk.net
- Gcc: nnfolder:folder.archive
-
- -----BEGIN PGP SIGNED MESSAGE-----
-
- ≡ thus on Sun, 4 Feb 1996 21:50:13 -0600, james virtually scripted...
-
- On Fri, 2 Feb 1996, pretzel wrote:
-
- >> How do you find the ascii value of a character? What I am actually
- >> trying to do is read a tab from the keyboard and use it in a switch
- >> statement. If the user hits tab, input a certain variable, etc. Also,
- >> finding ascii values has infinite other uses.
-
- james> printf("The character code for TAB is %d\n", '\t');
-
- if you're using...
-
- int input;
-
- input = getchar (); /* in RAW mode */
-
- switch (input)
- {
- case '\t':
- /* source for processing TAB */
- break;
- }
-
- It makes the source a little more readable instead of using the ASCII
- numbers for the different designates. Just a matter of style.
-
- d.
- - --
- Grok:
- [from the novel "Stranger in a Strange Land", by R. A. Heinlein,
- where it is a Martian word meaning roughly "to be one with"] v. To
- understand, usually in a global sense.
- ~ from the jargon file
-
- -----BEGIN PGP SIGNATURE-----
- Version: 2.6.2
- Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
-
- iQCVAwUBMRai4IX26urqpgG1AQHHIwQArXModueNOygUivo2oADk6pohTBYfn0uc
- oc6WMGvrmNO6LmYIQgc6L0w2SluPytvvEXzR84dRvBxBF3DZFCUpiU+ZsVNRuwnB
- qs0xiLcN9+/ahhs8dLQtxB2FMtPmejxfrl+iWYDjBesZdU7wCS2hcQhPmE2785hv
- cizGo2qtYBw=
- =GDRm
- -----END PGP SIGNATURE-----
-